#ifndef __DESC_TYPE_H__
#define __DESC_TYPE_H__

typedef int EType;
typedef int Atype;

typedef struct _Element {
	EType type;
	Rect rect;
	Parameter param;
	char name[8];
	unsigned int pnode, nnode;

}Element;

typedef struct _Rect {
	unsigned int x, y;
	unsigned int width, height;
}Rect;

typedef struct _Parameter {
	float value;
}Parameter;

typedef struct _Analysis {
	AType type;
	union {
		DC dc;
		AC ac;
	}u;
}Analysis;

typedef struct _DC {
	char srcname[8];
	float vstart, vstop, vincr;
}DC;

typedef struct _AC {
	int type;
	int np;
	int fstart, fstop;
}AC;

typedef struct _Description {
	Element *elements;
	Analysis *analysis;
	char name[20];
	int nElements;
}Description;

#endif __DESC_TYPE_H__
